import shangChao from "./shangChao/index.vue";
import ptCategory from "./ptCategory/index.vue";

export default {
    components: {
        shangChao,
        ptCategory

    },
    data() {
        return {
            businessType: '02',
            tab: {
                shangChao: "商超",
                kaBa: "咖吧",
                xiYi: "洗衣",
                jiaZheng: "家政",
            },
            keyName:'01'
        }
    },
    mounted() {
        this.getList()
    },
    methods: {
        goBusiness(key) {
            this.businessType = key
            this.$refs.shangChao.getList({}, 1, this.businessType)
            this.$refs.ptCategory.getList({}, 1, this.businessType)
        },
        getList() {
            this.$refs.shangChao.getList({}, 1, this.businessType)
            this.$refs.ptCategory.getList({}, 1, this.businessType)
        },
        callback(key) {
            this.keyName = key
            switch (key) {
                case '01':
                    this.$refs.shangChao.getList({}, 1, this.businessType)
                    break;
                case '02':
                    this.$refs.ptCategory.getList({}, 1, this.businessType)
                    break;
                default:
                    break;
            }
        },
    }
}